package com.yq.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yq.domain.SysLoginUser;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SysLoginUserMapper extends BaseMapper<SysLoginUser> {

    @Select("SELECT DISTINCT t1.perms from sys_menu as t1 JOIN sys_user_role as t2 JOIN sys_role_menu as t3 on\n" +
            "(t1.menu_id =t3.menu_id and t2.role_id =t3.role_id) where user_id =#{value} and type =2")
    List<String> selectAuthById(Long userId);

}